#ifndef __OF_IRQ_H__
#define __OF_IRQ_H__

#include "linux/of.h"
#include "linux/of_address.h"
#include "linux/of_device.h"
#include "linux/types.h"

typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);

extern unsigned int irq_of_parse_and_map(struct device_node *dev, int index);
extern int of_irq_parse_raw( __be32 *addr, struct of_phandle_args *out_irq);
extern int of_irq_parse_one(struct device_node *device, int index,  struct of_phandle_args *out_irq);
extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data);
extern int of_irq_to_resource(struct device_node *dev, int index,   struct resource *r);
extern int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs);
extern void of_irq_init( struct of_device_id *matches);
extern int of_irq_count(struct device_node *dev);
extern int of_irq_get(struct device_node *dev, int index);
extern int of_irq_get_byname(struct device_node *dev,  char *name);

#endif
